var theInt = null;
var $crosslink, $navthumb;
var curclicked = 0;
theInterval = function(cur){
clearInterval(theInt);
if( typeof cur != &#39;undefined&#39; )
curclicked = cur;
$crosslink.removeClass(&quot;active-thumb&quot;);
$navthumb.eq(curclicked).parent().addClass(&quot;active-thumb&quot;);
$(&quot;.stripNav ul li a&quot;).eq(curclicked).trigger(&#39;click&#39;);
theInt = setInterval(function(){
$crosslink.removeClass(&quot;active-thumb&quot;);
$navthumb.eq(curclicked).parent().addClass(&quot;active-thumb&quot;);
$(&quot;.stripNav ul li a&quot;).eq(curclicked).trigger(&#39;click&#39;);
curclicked++;
if( 6 == curclicked )
curclicked = 0;
}, 3000);
};
$(function(){
$(&quot;#main-photo-slider&quot;).codaSlider();
$navthumb = $(&quot;.nav-thumb&quot;);
$crosslink = $(&quot;.cross-link&quot;);
$navthumb
.click(function() {
var $this = $(this);
theInterval($this.parent().attr(&#39;href&#39;).slice(1) - 1);
return false;
});
theInterval();
});
